package com.duan.boot.entity;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.ApiOperation;
import lombok.Data;

import javax.validation.constraints.NotNull;
import java.util.Date;

/**
 * @author duan
 */
@Data
public class User {
    @TableId
    @NotNull(message = "用户id不能为空")
    private Integer userId;

    @NotNull(message = "用户名不能为空")
    private String userName;

    private String userPassword;

    @NotNull(message = "部门不能为空")
    private String userDepartment;

    @NotNull(message = "用户的专业不能为空")
    private String userMajors;

    @NotNull(message = "用户的性别不能为空")
    private Integer userGender;

    @NotNull(message = "用户的手机号不能为空")
    private String userPhone;

    @NotNull(message = "用户的邮箱不能为空")
    private String userEmail;

    @NotNull(message = "职位不能为空")
    private int userLevel;

    private Integer userState;

    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private Date userJoinTime;

    //@ApiModelProperty(value = "附件")
    //private byte[] userImg;

    private String userImgUrl;

    private String userMotto;
}
